
const initState = {count: 0,username:'张三'}
export const reducer = (state=initState, action) => {
    console.log(state);
    switch(action.type) {
        case 'add_action':
            return {
                count: state.count+1
            }
        case 'jian_action':
            return {
                count: state.count-1
            }
        default:
            return state
    }
   
}